/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
#ifndef _MACHINECTRLTYPES_HPP_
#define _MACHINECTRLTYPES_HPP_

namespace MaCI{
  namespace MachineCtrl{
    

    /** MaCI Interface types
     *
     * This enumeration defines all the available interfaces used in machineCtrl
     */
    enum EInterfaceType{
      KTypeUnknown                = -1,  ///< Unknown type
      KTypeAll                    = 0,   ///< All the types
      KTypeAlarm                  = 1,   ///< Alarm interface
      KTypeBehaviour              = 2,   ///< Behaviour Interface
      KTypeCoordinateDrive        = 3,   ///< CoordinateDrive Interface
      KTypeEmergencyStop          = 4,   ///< EmergencyStop Interface
      KTypeEnergy                 = 5,   ///< Energy Interface
      KTypeImage                  = 6,   ///< Image Interface
      KTypeIMU                    = 7,   ///< IMU Interface
      KTypeIO                     = 8,   ///< IO Interface
      KTypeJointGroupCtrl         = 9,   ///< JointGroupCtrl Interface
      KTypeMap                    = 10,  ///< Map Interface
      KTypeParameter              = 11,  ///< Parameter Interface
      KTypePosition               = 12,  ///< Position Interface
      KTypeRanging                = 13,  ///< Ranging Interface
      KTypeSpeedCtrl              = 14,  ///< SpeedCtrl Interface
      KTypeText                   = 15,  ///< Text Interface
      KTypeUnit                   = 16,  ///< Unit Interface
      KTypeWireless               = 17   ///< Wireless Interface

    };

    typedef std::pair<EInterfaceType, std::string> TComponent;   ///< Interface type and the instance name as a pair
    typedef std::list<TComponent> TMaCIMachineComponents;       ///< List of several machine instance


    //** KEY OF THE MAPS IS THE INSTANCE NAME OF THE SERVICE
    typedef std::map<std::string,MaCI::Alarm::CAlarmClient*> TAlarmClientMap;
    typedef std::map<std::string,MaCI::Behaviour::CBehaviourClient*> TBehaviourClientMap;
    typedef std::map<std::string,MaCI::CoordinateDrive::CCoordinateDriveClient*> TCoordinateDriveClientMap;
    typedef std::map<std::string,MaCI::EmergencyStop::CEmergencyStopClient*> TEmergencyStopClientMap;
    typedef std::map<std::string,MaCI::Energy::CEnergyClient*> TEnergyClientMap;
    typedef std::map<std::string,MaCI::Image::CImageClient*> TImageClientMap;
    typedef std::map<std::string,MaCI::IMU::CIMUClient*> TIMUClientMap;
    typedef std::map<std::string,MaCI::IO::CIOClient*> TIOClientMap;
    typedef std::map<std::string,MaCI::JointGroupCtrl::CJointGroupCtrlClient*> TJointGroupCtrlClientMap;
    typedef std::map<std::string,MaCI::Map::CMapClient*> TMapClientMap;
    typedef std::map<std::string,MaCI::Parameter::CParameterClient*> TParameterClientMap;
    typedef std::map<std::string,MaCI::Position::CPositionClient*> TPositionClientMap; 
    typedef std::map<std::string,MaCI::Ranging::CRangingClient*> TRangingClientMap;
    typedef std::map<std::string,MaCI::SpeedCtrl::CSpeedCtrlClient*> TSpeedCtrlClientMap;
    typedef std::map<std::string,MaCI::Text::CTextClient*> TTextClientMap;
    typedef std::map<std::string,MaCI::Unit::CUnitClient*> TUnitClientMap;
    typedef std::map<std::string,MaCI::Wireless::CWirelessClient*> TWirelessClientMap;



    typedef std::map<std::string,MaCI::CMaCI *> TMaCIBaseClientMap;
    typedef std::map<EInterfaceType,TMaCIBaseClientMap> TMaCIClientsMap;


  }
}

#endif ///< _MACHINECTRLTYPES_HPP_
